flag=1
while flag:
  grade=eval(input())
  try:
      if 100>=grade>=90:
        print('A')
      elif 90>grade>=80:
        print('B')
      elif 80>grade>=70:
        print('C')
      elif 70>grade>=60:
        print('D')
      elif 60>grade>=0:
        print('E')
      elif grade<0:
        print('end')
        flag=0
      else:
        print('data error!')
  except:
    print('data error!')


